package com.project.srtp.common.convention;

import com.project.srtp.common.result.errorcode.ResultCode;

/**
 * @author 曹行阳
 * @version 0.1
 * @date 2025/3/25 11:33
 */
public class RemoteException extends AbstractException {
    public RemoteException(ResultCode code) {
        super(null, null, code);
    }

    public RemoteException(String message) {
        super(message, null, ResultCode.BAD_REQUEST);
    }

    public RemoteException(String message, ResultCode code) {
        super(message, null, code);
    }

    public RemoteException(String message, Throwable throwable, ResultCode code) {
        super(message, throwable, code);
    }

    @Override
    public String toString() {
        return "RemoteException{" +
                "code='" + errorCode + "', " +
                "message='" + errorMessage + "'" +
                "}";
    }
}
